package com.itheima_5;

import com.sun.scenario.effect.impl.sw.sse.SSEBlend_SRC_OUTPeer;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.ThreadPoolExecutor;

public class MyThreadPoolDemo1 {
    public static void main(String[] args){
        ExecutorService executorService = Executors.newFixedThreadPool(10);
         ThreadPoolExecutor pool =(ThreadPoolExecutor)executorService;
        System.out.println(pool.getCorePoolSize());
        /*executorService.submit(()->{
            System.out.println(Thread.currentThread().getName()+"执行了");
        });
        executorService.submit(()->{
            System.out.println(Thread.currentThread().getName()+"执行了");
        });
        executorService.shutdown();*/

    }
}
